<%-- 
    Document   : login
    Created on : 11/11/2009, 09:34:35 PM
    Author     : Juan Garza
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Login</title>
    </head>
    <body>
        <form action="<% out.println("http://" + request.getLocalName() + ":" + request.getLocalPort() + "/RoyalMowes/C_Login"); %>" method="post">
        <%
            String user = "";
            user = request.getParameter("user");
            if(!(user==null)){
                if(user.equals("not")){
                    out.println("<center><h3>Usuario no registrado</h3></center><br><br>");
                }else if(user.equals("dif")){
                    out.println("<center><h3>Usuario y/o contrase&ntilde;a incorrectas</h3></center><br><br>");
                }
            }
        %>
            <table align="center">
            <tr>
                <td align="center" colspan="2"><h2>Login</h2></td>
            </tr>
            <tr>
                <td align="right">Usuario:</td>
                <td><input type="text" name="username" size="20" /></td>
            </tr>
            <tr>
                <td align="right">Contrase&ntilde;a:</td>
                <td><input type="password" name="password" size="21" /></td>
            </tr>
            <tr><td colspan="2">&nbsp;</td></tr>
            <tr><td colspan="2" align="center"><input type="submit" value="Entrar" name="login" /></td></tr>
            <tr><td colspan="2" align="right"><a href="<% out.println("http://" + request.getLocalName()+ ":" + request.getLocalPort() + "/RoyalMowes/alta_usuarios.jsp?acc=1"); %>">Registrarse</a></td></tr>
        </table>
        </form>
    </body>
</html>
